-
Notifications
You must be signed in to change notification settings - Fork 160
Update Combo and Simple Combo Keyboard Navigation & Add Escape Key behavior #16246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates keyboard navigation for Combo and Simple Combo components by adding Escape key behavior and improving Tab key handling. When the dropdown is collapsed, pressing Escape now clears the selection. When the dropdown is open, pressing Escape closes it. Tab key behavior is refined to properly close the dropdown and move focus to the next element.
Key changes:
- Added Escape key handler to clear selection when combo is collapsed and close dropdown when open
- Modified Tab key handling to prevent default behavior only for navigation keys (excluding Tab)
- Removed keyboard event handlers from clear and toggle buttons, simplifying the interaction model
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| simple-combo.component.ts | Added Escape key handler and consolidated clear button logic |
| simple-combo.component.spec.ts | Added tests for Escape key behavior and updated Tab key test |
| simple-combo.component.html | Removed keyboard handlers and tabindex from clear/toggle buttons |
| combo.component.ts | Added Escape key handler and consolidated clear button logic |
| combo.component.spec.ts | Added tests for Escape and Tab key behaviors |
| combo.component.html | Removed keyboard handlers and tabindex from clear/toggle buttons |
| combo.common.ts | Enhanced close handler to detect Tab key and refocus input |
| combo-dropdown.component.ts | Separated Tab and Escape key handling in action handler |
| drop-down-navigation.directive.ts | Updated to allow Tab key default behavior |
| query-builder-functions.spec.ts | Updated test expectations after toggle button removal from tab order |
| CHANGELOG.md | Documented new keyboard navigation features |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
projects/igniteui-angular/src/lib/simple-combo/simple-combo.component.spec.ts
Outdated
Show resolved
Hide resolved
…into mkirkova/combo-navigation-16223
Closes #16223
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)